﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Client.ViewModel
{
    public abstract class ViewModelBase : INotifyPropertyChanged,IDisposable
    {
        public event PropertyChangedEventHandler PropertyChanged;
        public virtual void OnPropertyChanged(string propertyNames)
        {
            if (this.PropertyChanged != null)
            {
                var e = new PropertyChangedEventArgs(propertyNames);
                this.PropertyChanged(this, e);
            }
        }

        public void Dispose()
        {
            this.OnDispose();
        }

        public virtual void OnDispose()
        {
          
        }
    }
}
